package org.ltt.rbac.config.provider;

import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import javax.security.auth.Subject;
import java.util.Collection;

public class PhoneAuthenticationToken extends AbstractAuthenticationToken {
    private String phone;
    private String code;
    public PhoneAuthenticationToken(String phone, String code) {
        super(null);
        this.phone = phone;
        this.code = code;
    }
    public PhoneAuthenticationToken(Collection<? extends GrantedAuthority> authorities) {
        super(authorities);
    }

    @Override
    public Object getCredentials() {
        return null;
    }

    @Override
    public Object getPrincipal() {
        return null;
    }

    @Override
    public boolean implies(Subject subject) {
        return super.implies(subject);
    }
}
